<?php

/**
 * 快捷回复列表
 */
$title = '快捷回复列表（二开功能）';
include 'header.php';
global $_QET;
global $DB;
?>
<style>
    .table td {
        padding-top: 0px;
        padding-bottom: 0px;
    }
</style>
<div class="row" id="AppHis" cid="<?= ($_QET['cid'] ?? -2) ?>" sqid="<?= ($_QET['sqid'] ?? -1) ?>">
    <div class="col-12">
        <div class="card">
            <div class="card-header">
                <a title="添加内容" href="javascript:App.addQuick();" class="badge badge-primary"><i
                        class="layui-icon layui-icon-addition"></i></a>
                <a title="搜索商品" href="javascript:App.SearchGoods();" class="badge badge-danger"><i
                        class="layui-icon layui-icon-search"></i></a>
                <a title="批量设置" href="javascript:" mdui-menu="{target: '#BatchOperation'}"
                    class="badge badge-success"><i class="layui-icon layui-icon-set"></i></a>
                <ul class="mdui-menu" id="BatchOperation">
                    <li class="mdui-menu-item">
                        <a href="javascript:App.BatchEditor(4);">
                            批量删除
                        </a>
                    </li>
                </ul>
                <a title="刷新" href="javascript:App.initialization();" class="badge badge-warning"><i
                        class="layui-icon layui-icon-refresh-3"></i></a>
            </div>
            <div class="card-body m-t-0" id="App" style="overflow-y: auto;min-height:70vh;">
                <div v-if="name!=''" class="mb-2">正在查看商品名称带[ {{name}} ]关键词的数据</div>
                <table id="table" class="table table-hover table-centered mb-0" style="font-size:0.9em;">
                    <thead style="white-space: nowrap">
                        <tr>
                            <th>操作</th>
                            <th>
                                <input name="checkbox_all" id="list_all" type="checkbox" onclick="goods.select_all()"
                                    value="true">
                                id
                            </th>

                            <th>回复内容</th>
                            <th>添加时间</th>
                        </tr>
                    </thead>
                    <tbody>
                        <tr v-for="(item,index) in Data">
                            <td>
                                <button :mdui-menu="'{target:\'#html_operation_'+item.id+'\'}'"
                                    class="mdui-btn mdui-ripple mdui-color-white mdui-text-color-blue-grey mdui-shadow-0 mdui-btn-icon">
                                    <i class="mdui-icon material-icons">&#xe8b8;</i>
                                </button>
                                <ul class="mdui-menu" :id="'html_operation_'+item.id">
                                    <li class="mdui-menu-item">
                                        <a href="javascript:" class="mdui-ripple">
                                            编号：{{ item.id }}
                                        </a>
                                    </li>

                                    <li class="mdui-menu-item">
                                        <a href="javascript:" @click="GoodsDelete(item.id)" class="mdui-ripple">删除数据</a>
                                    </li>
                                </ul>
                            </td>
                            <td>
                                <input type="checkbox" name="checkbox[]" :class="'list_box box_'+item.id"
                                    :onclick="'goods.select_id('+item.id+')'" :value="item.id" />
                                {{item.id}}
                                </a>
                            </td>
                            <td>
                                <div class="layui-elip mdui-text-color-deep-orange" :title="item.name">{{item.docs}}
                                </div>
                            </td>

                            <td>
                                <span>{{item.addtime}}</span>
                            </td>
                        </tr>
                    </tbody>
                </table>
                <div v-if="Data.length===0" class="text-center w-100 mt-3 font-w300">
                    {{ type==-1?'正在载入中,请稍后...':'一条数据也没有' }}
                </div>
            </div>
            <div class="layui-card-body" style="text-align:center;">
                <div id="Page"></div>
            </div>
        </div>
    </div>
</div>
<div id="content_s" style="display: none">
    <div class="form-horizontal layui-form">
        <input type="checkbox" name="method[]" lay-skin="primary" value="1" title="[1] 允许在线购买" checked="">
        <input type="checkbox" name="method[]" lay-skin="primary" value="2" title="[2] 允许余额购买" checked="">
        <input type="checkbox" name="method[]" lay-skin="primary" value="3" title="[3] 允许被兑换" checked="">
        <input type="checkbox" name="method[]" lay-skin="primary" value="4" title="[4] 允许被对接" checked="">
        <input type="checkbox" name="method[]" lay-skin="primary" value="5" title="[5] 启用商品价格监控" checked="">
        <input type="checkbox" name="method[]" lay-skin="primary" value="6" title="[6] 允许被克隆" checked="">
        <input type="checkbox" name="method[]" lay-skin="primary" value="7" title="[7] 允许购买多份" checked="">
    </div>
</div>
<?php include 'bottom.php'; ?>
<script src="../assets/js/vue3.js"></script>
<script src="../assets/admin/js/quick_reply.js?vst=<?= $accredit['versions'] ?>"></script>